package com.intretech.tj.global.tools;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

/**
 * 时间工具类
 */
public class TimeTool {
    /**
     * 获取当前日期
     *
     * @return 返回字符串
     */
    public static String getNowDate() {
        return  LocalTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
    }

    public static String getNowTime() {
        return LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss"));
    }
}
